package com.net.core.core.reuslt;

public enum ResultCode {
    FAIL(400, "失败"),
    UNAUTHORIZED(401, "未认证（签名错误）"),
    TOKEN_NULL(402, "token异常"),
    PWDERROR(450, "支付密码错误"),
    NOT_FOUND(404, "接口不存在"),
    NOT_DATA(406, "没有该数据"),
    AUTH_ERROR(301, "权限不够异常"),
    BINDING_NULL(421, "绑定为空"),
    AUDIT_AUTHENTICATION(411, "验证身份失败"),
    UNION_ID(414, ""),
    WX_NO_REGISTER(415, ""),
    INTERNAL_SERVER_ERROR(500, ""),
    PWD_ERROR(450, "支付密码错误"),
    LOGIN_SOON_TO_EXPIRE(1111, "系统即将到期"),
    LOGIN_IN_BLACKLIST(1112, "医院在黑名单内"),
    LOGIN_EXPIRE(1113, "系统到期"),
    LOGIN_NOT_FOUND_REGISTRATION(1114, "未找到程序注册文件"),
    DOG_NOT_FIND(1117, "未找到网络狗服务，请检查网络狗配置"),
    DOG_FAILED(1118, "网络狗服务失败，请检查网络狗服务"),
    SUCCESS(200, "操作成功"),
    FAILED(401, "操作失败"),
    YX_REQUIRE_PARAMS(402, "参数不完整"),
    YX_NOT_FOUND_404(404, "路径不存在，请检查路径是否正确"),
    NOT_CARD(416, "没有医院卡信息"),
    REG_RESTRICTIONS(417, "挂号限制"),
    NO_APP_VERSION(420, "app版本不匹配"),
    KEY_INTERFACE_FAIL(430, "签名验证失败"),
    KEY_ORGAN_EXPIRE(431, "签名过期"),
    KEY_DOC_EXPIRE(432, "签名过期"),
    KEY_DOC_FAIL(433, "文档签名验证失败"),
    YX_INTERNAL_SERVER_ERROR_500(500, "系统内部错误"),
    YX_WX_LOGIN_SUCCESS(1500, "登录成功"),
    YX_WX_NULL_CODE_ERROR(1501, "获取用户微信code失败，登录失败"),
    YX_WX_NO_AUTH(1502, "没有权限进行操作"),
    YX_DB_DATA_EXIST_2000(2000, "数据库中已存在该记录"),
    YX_DB_FILED_LENGTH_LIMIT_2001(2001, "字段太长,超出数据库字段的长度"),
    YX_REDIS_ERROR_3000(3000, "Redis连接异常!");

    private Integer CODE;
    private String MESSAGE;

    private ResultCode(Integer code, String message) {
        this.CODE = code;
        this.MESSAGE = message;
    }

    public Integer getCode() {
        return this.CODE;
    }

    public String getMessage() {
        return this.MESSAGE;
    }

    public static ResultCode getByCode(Integer index) {
        ResultCode[] var1 = values();
        int var2 = var1.length;

        for (int var3 = 0; var3 < var2; ++var3) {
            ResultCode tEnum = var1[var3];
            if (tEnum.getCode().equals(index)) {
                return tEnum;
            }
        }

        return null;
    }
}
